#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author： 胡浩浩
# datetime： 2021/12/28 12:10 
# ide： PyCharm
from typing import List, Optional
from pydantic import BaseModel


class ApiBase(BaseModel):
    id: int
    name: str
    method: str
    path: str
    params: str
    deleted: bool
    response: str
    create_time: str
    create_user_id: int
    create_user_name: str
    update_time: str
    update_user_id: int
    update_user_name: str
    description: Optional[str] = None
    model: str


class ApiCreate(ApiBase):
    pass


class Api(ApiBase):
    pass

    class Config:
        orm_mode = True
